<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>尸体照片</title> 
    <link href="css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="jquery-easyui-1.5.3/themes/default/easyui.css">
    <link href="jquery-easyui-1.5.3/themes/icon.css" rel="stylesheet">
    <link href="css/basic_info.css" rel="stylesheet">
    <link rel="stylesheet" href="css/xk.css">
    <script type="text/javascript" src="font_jjkmvgsdpk/iconfont.js"></script>
    <link rel="stylesheet" href="font_jjkmvgsdpk/iconfont.css">
    <link href="css/process.css" rel="stylesheet">
</head> 
<body>
 <div class="container">
  <div class="xk_submit" style="height: 24px;background-color: #eeeeee;text-align: center;">  
   <button class="easyui-linkbutton" type="button" iconCls="icon-save" style="height: 24px;margin-left: 5px;">保存</button>
   <button class="easyui-linkbutton" type="button" id="jzxxfy" iconCls="icon-large-clipart" style="height: 24px;margin-left: 5px;">批量上传</button>
   <button class="easyui-linkbutton" type="button" id="jbxx_cancel" iconCls="icon-cancel" style="height: 24px;margin-left: 5px;">取消</button>
  </div>      
  <div class="content">
   <div style="margin-left: 1%;background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%);height: 28px;line-height: 28px;border: 1px solid #CCCCCC;padding-left: 5px;">
   <ul id="a_bian"> 
    <li style="float: left;"><a href="stjdxx"><span>基本信息</span></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
    <li style="float: left;"><span>尸检照片</span></li>
   </ul>
   </div>
   <form>
    <table class="xk_table" id="stxx_table">
     <tr>
       <td class="xk_label" colspan="6">添加尸检照片信息
        <button class="easyui-linkbutton" type="button" id="sjzp_add" iconCls="icon-add" style="height: 24px;margin-left: 5px;"></button>
        <button class="easyui-linkbutton" type="button" id="sjzp_del" iconCls="icon-remove" style="height: 24px;margin-left: 5px;"></button>
       </td>
     </tr>
     <tbody id="sjzpxx_table"> 
     <tr>
      <td class="xk_label">尸检照片<font>*</font></td>
      <td style="width: 25%;">
        <input type="file" name="photoId" class="xk_input" style="width: 90%;">
      </td>
      <td class="xk_label">照片名称</td>
      <td style="width: 25%;">
        <input type="text" class="xk_input" style="width: 90%;">
        <input type="text" class="xk_input" value="1" name="name" style="width: 90%;display: none;">
      </td>
      <td class="xk_label">照片类型</td>
      <td style="width: 25%;">
        <select class="xk_input" name="type" style="width: 90%;">
         <option value="1" selected="selected">尸表</option>
         <option value="2">解剖</option>
        </select>
      </td>
     </tr>
    <tr>
    <td class="xk_label_textarea">照片说明</td>
    <td colspan="5"><textarea type="text" class="xk_input_textarea" name="description"></textarea></td>
    </tr>
   </tbody>  
  </form>
  </div>   
 </div>    
</body>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
<script type="text/javascript">
//高度适应
var x = $(".xk_submit").height();
$(".xk_submit").css({"bottom":"0","left":"0","right":"0","position":"fixed"})
$(".content").css("margin-bottom",x);
$("#a_bian li:eq(3)").css("color","red");
$("#a_bian li:eq(1)").css("color","red");
var sjzpxx = 1;
$("#sjzp_add").click(function(){
   var sjzpxx_value = ++sjzpxx;
 $("#stxx_table").append("<tbody id='stzp_"+sjzpxx_value+"'><tr>"+
      "<td class='xk_label'>尸检照片<font>*</font></td>"+
      "<td style='width: 25%;'>"+
        "<input type='file' class='xk_input' style='width: 90%;'>"+
      "</td>"+
      "<td class='xk_label'>照片名称</td>"+
      "<td style='width: 25%;'>"+
        "<input type='text' class='xk_input' style='width:90%;'>"+
        "<input type='text' class='xk_input' value='"+sjzpxx_value+"' name='name' style='width: 90%;display:none;'>"+
      "</td>"+
      "<td class='xk_label'>照片类型</td>"+
      "<td style='width: 25%;'>"+
        "<select class='xk_input' name='' style='width: 90%;'>"+
         "<option value='1' selected='selected'>尸表</option>"+
         "<option value='2'>解剖</option>"+
        "</select>"+
      "</td>"+
     "</tr>"+
    "<tr>"+
    "<td class='xk_label_textarea'>照片说明</td>"+
    "<td colspan='5'><textarea type='text' class='xk_input_textarea' name=''></textarea></td>"+
    "</tr></tbody>");
});
$("#sjzp_del").click(function(){
   var arr = document.getElementsByName("name");
   for(var j = 0;j<arr.length;j++){
   if(j == arr.length-1){
     if(arr[j].value == 1){
     }else{
       $("#stzp_"+arr[j].value).remove();
         sjzpxx--;
      }
    }
  }
});
</script>
</html>